package com.qianfeng.missfood.ui;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.qianfeng.missfood.R;

public class ServiceRulesActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_service_rules);


        initView();
    }

    private void initView() {

        WebView serviceWebView = (WebView) findViewById(R.id.serviceWebView);
        serviceWebView.getSettings().setJavaScriptEnabled(true);
        serviceWebView.loadUrl("http://m.mishi.cn/about/buyers_agreement.html");

        serviceWebView.setWebViewClient(new ServiceWebViewClient());
    }

    private class ServiceWebViewClient extends WebViewClient {

        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {

            view.loadUrl(url);
            return true;
        }
    }


}
